package User;

import IOperation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/4/15
 * Time: 11:03
 * Description: No Description
 */
public class User extends Animal{

    public User(String name) {
        super(name);
        this.iOperations = new IOperation[]{
                new Exit(),
                new Find(),
                new Borrow(),
                new Return(),
                new Display(),
        };
    }

    @Override
    public int menu() {
        System.out.println(this.name+"欢迎来到图书小练习！！");
        System.out.println("1.查找图书");
        System.out.println("2.外借图书");
        System.out.println("3.归还图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        System.out.println("请选择：");
        Scanner scan = new Scanner(System.in);
        int index = scan.nextInt();
        return index;
    }
}